package calvin.study.springboot.config.ioc;

import org.springframework.aop.TargetSource;
import org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.InitializingBean;

public class GlobalTransactionScanner extends AbstractAutoProxyCreator implements InitializingBean {

	/**TODO*/
	private static final long serialVersionUID = 1L;

	@Override
	protected Object[] getAdvicesAndAdvisorsForBean(Class<?> beanClass, String beanName,
			TargetSource customTargetSource) throws BeansException {
		System.out.println("getAdvicesAndAdvisorsForBean " + beanName);
		return null;
	}

	@Override
	protected Object wrapIfNecessary(Object bean, String beanName, Object cacheKey) {
		System.out.println("wrapIfNecessary " + beanName);
		return bean;
	}

	@Override
	public void afterPropertiesSet() throws Exception {
		System.out.println("【Bean实例化阶段执行】");
	}

}
